/*
 * @Author: linZeJian
 * @Date: 2021-07-15 10:38:23
 * @LastEditors: linZeJian
 * @LastEditTime: 2022-04-25 15:09:37
 * @Description: 
 */
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/css/global.scss'
//全局配置
import config from './utils/config'
//初始化操作
import './permission.js'
//vant导入
import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)

Vue.config.productionTip = false

Vue.prototype.$config = config

/* vue中的px转rem适配 */
// Vue.prototype.$rootNodeSize = () => {
//   document.documentElement.style.fontSize = document.body.offsetWidth / config.uiWidth * config.pxToRem + 'px'
// }
// Vue.prototype.$setNodeSize = (val, min, max) => {
//   Vue.prototype.$rootNodeSize = () => {
//     let size = document.body.offsetWidth / config.uiWidth * config.pxToRem
//     if (val) {
//       size = val
//     } else if (size < min) {
//       size = min
//     } else if (size > max) {
//       size = max
//     }
//     document.documentElement.style.fontSize = size + 'px'
//   }
//   Vue.prototype.$rootNodeSize()
// }

// Vue.prototype.$rootNodeSize()
// window.onresize = () => {
//   Vue.prototype.$rootNodeSize()
// } 
/* end */

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
